project(
  dynamic_json_ui
  LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_AUTOUIC_SEARCH_PATHS (ui))
find_package(Qt5 COMPONENTS Widgets Core REQUIRED)

set(_srcs
    src/dynamic_json_ui.cpp
    src/json_parser.cpp
    src/widget_factory.cpp
    src/widget_registry.cpp
)

set(_headers
    include/${PROJECT_NAME}/dynamic_json_ui.h
    include/${PROJECT_NAME}/json_parser.h
    include/${PROJECT_NAME}/widget_factory.h
    include/${PROJECT_NAME}/widget_registry.h
    include/${PROJECT_NAME}/json_ui_element.h
)

set(_ui
)

add_library(${PROJECT_NAME} SHARED ${_srcs} ${_headers} ${_ui})
target_link_libraries(${PROJECT_NAME} PUBLIC
    av_player
    Qt5::Widgets Qt5::Core ${CMAKE_THREAD_LIBS_INIT}
)
target_include_directories(${PROJECT_NAME} PUBLIC include)
